<template>
  <div>
    <van-cell-group v-for='(item,index) in spreadCommissionList' :key='index'>
      <van-cell v-if='!spreadCommissionList.length < 1' :title=item.title :value=item.number />
    </van-cell-group>

  </div>
</template>

<script>
import { spreadCommission } from '@/api/commission.js'

export default {
  data() {
    return {
      spreadCommissionList: []
    }
  },
  methods: {
    getSpreadComm(data) {
      spreadCommission(data).then(res => {
        this.spreadCommissionList = res.data
        if (this.spreadCommissionList.length < 1) {
          this.$toast('暂无推广')
        } else {
          this.spreadCommissionList = res.data[0].list
        }
      })
    }
  },
  created() {
    this.getSpreadComm(3)
  }
}
</script>

<style lang='scss' scoped>

</style>
